<template lang="pug">
.page
  .InsuranceInfoSet
    Tabs(:name="tabName" :animated="false" @on-click="handleClickTab")
      TabPane(label="社会保险" name="shebao" v-if="checkEmployeeNum.indexOf('1') !== -1")
        CreateStepsShebao(:isInsuranceInfoSet="true")
      TabPane(label="公积金" name="gongjijin" v-if="checkEmployeeNum.indexOf('2') !== -1")
        CreateStepsGongjijin(:isInsuranceInfoSet="true")
      TabPane(label="商业保险" name="shangbao" v-if="checkEmployeeNum.indexOf('3') !== -1")
        CreateStepsShangbao(:isInsuranceInfoSet="true")
  //- .InsuranceInfoSet
  //-   .form-shebao-title.font-16.font-weight 社会保险
  //-   include ./modal/formShebaoFilter.pug
  //-   include ./modal/formShebao.pug
  //-   .h20
  //-   .form-shebao-title.font-16.font-weight 公积金
  //-   include ./modal/formGongjijinFilter.pug
  //-   include ./modal/formGongjijin.pug
  //-   .clearfix.text-center.mt-20.mb-20
  //-     Button.mr-20(type="info" @click="handleSubmit") 保存
  //-     Button 取消
</template>

<script>
import { FormShebaoFilter, FormShebaoFilterItem, FormShebaoTitle, FormShebao, FormShebaoItem, FormGongjijinFilter, FormGongjijinFilterItem, FormGongjijinTitle, FormGongjijin, FormGongjijinItem } from './EBformData.js'
import _cloneDeep from 'clone-deep'
import CreateStepsShebao from './modal/createStepsShebao-dynamic.vue' // 社会保险
import CreateStepsGongjijin from './modal/createStepsGongjijin-dynamic.vue' // 公积金
import CreateStepsShangbao from './modal/createStepsShangbao.vue' // 商业保险

export default {
  name: 'InsuranceInfoSet',

  components: {
    CreateStepsShebao,
    CreateStepsGongjijin,
    CreateStepsShangbao
  },

  data () {
    return {
      isOnlyView: false,
      formShebaoFilter: _cloneDeep(FormShebaoFilter),
      formShebaoFilterItem: _cloneDeep(FormShebaoFilterItem),
      formShebaoTitle: _cloneDeep(FormShebaoTitle),
      formShebao: _cloneDeep(FormShebao),
      formShebaoItem: _cloneDeep(FormShebaoItem),
      formGongjijinFilter: _cloneDeep(FormGongjijinFilter),
      formGongjijinFilterItem: _cloneDeep(FormGongjijinFilterItem),
      formGongjijinTitle: _cloneDeep(FormGongjijinTitle),
      formGongjijin: _cloneDeep(FormGongjijin),
      formGongjijinItem: _cloneDeep(FormGongjijinItem),
      rules: {},
      arrListDown: {},
      dateOptions: {},
      tabName: null,
      checkEmployeeNum: '1,2,3'
    }
  },

  watch: {
  },

  created () {
    this.checkEmployeeNum = this.$route.query.checkEmployeeNum
    if (this.checkEmployeeNum.indexOf('1') !== -1) {
      this.tabName = 'shebao'
    } else if (this.checkEmployeeNum.indexOf('2') !== -1) {
      this.tabName = 'gongjijin'
    } else if (this.checkEmployeeNum.indexOf('3') !== -1) {
      this.tabName = 'shangbao'
    }
    console.log('this.tabName: ' + this.tabName)
  },

  mounted () {
  },

  methods: {
    handleClickTab (name) {
      this.tabName = name
    }
  }
}
</script>

<style lang="less" scope>
.InsuranceInfoSet{

}
</style>
